﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MSGGolbalInfo;
using Talk.Common;

namespace TalkServer
{
    public partial class GroupData : List<GROUP>
    {
        const string _className = "GroupData";

        public void Start()
        #region >><<
        {
            isStart = true;
        }
        public bool isStart { get; protected set; }
        public void Stop()
        {
            isStart = false;
        }

        public bool isDispose { get; protected set; }
        public void Dispose()
        {
            isDispose = true;
            Stop();
        }
        #endregion

        public virtual void AllUser(List<USER> lst)
        {
            this.Clear();
            if (lst == null || lst.Count == 0) return;
            for (int ii = 0; ii < lst.Count; ii++)
            {
                USER item = lst[ii];

            }
        }

        public GROUP GetITEM(int id)
        {
            GROUP rtn = this.Find(r => r.ID == id);
            if (rtn == null)
            {
                List<string> lst1 ;
                if (Load(id, out rtn, out lst1))
                {

                }
                this.Add(rtn);
            }
            return rtn;
        }

        public bool GetITEM(List<int> lst1, out List<GROUP> lst2)
        {
            bool rtn = false;
            lst2 = null;
            if (lst1 != null && lst1.Count > 0)
            {

            }
            return rtn;
        }
    }
}
